package com.zhouz.admin.app.db.domain.enums;

public enum IsOrNotEnum {
    //是，否;有，无
    YES("Y","是"),
    NO("N","否"),
    ;
    private String value;
    private String desc;

    private IsOrNotEnum(String value, String desc){
        this.value = value;
        this.desc = desc;
    }

    public String getDesc() {
        return desc;
    }

    public String getValue() {
        return value;
    }

    public static String fromValue(String value2) {
        for (IsOrNotEnum type : IsOrNotEnum.values()) {
            if (type.getValue().equals(value2)) {
                return type.getDesc();
            }
        }
        return "";
    }
}
